package com.pfzy.lib.common.http;

//import com.pfzy.lib.common.eventbusDTO.EventBusTokenExpire;
import com.pfzy.lib.net.BaseEntity;

//import org.greenrobot.eventbus.EventBus;

public class ErrorCodeHandler {
    public static boolean handle(BaseEntity baseEntity) {
//        EventBusTokenExpire loginAgain = new EventBusTokenExpire();
        switch (baseEntity.code) {
//            case HttpCode.CAP_TOKEN_EXPIRE:
//                loginAgain.setMessage("该账号已被退出，请重新登录");
//                EventBus.getDefault().post(loginAgain);
//                return true;
//            case HttpCode.ACCOUNT_FORBIDDEN:
//                loginAgain.setMessage("该账号已被退出，请重新登录");
//                EventBus.getDefault().post(loginAgain);
//                return true;
//            case HttpCode.ACCOUNT_INEXISTENCE:
//                loginAgain.setMessage("该账号已被退出，请重新登录");
//                EventBus.getDefault().post(loginAgain);
//                return true;
            default:
                return false;
        }
    }
}
